from django.urls import path

from lapi_app.view.testcase_view.api_test_result import api_result
from lapi_app.view.testcase_view.batch_list_request import batch_list_request, get_case
from lapi_app.view.testcase_view.batch_request import batch_send, get_batch_result, get_single_batch_result
from lapi_app.view.testcase_view.copy_case import Copy_case
from lapi_app.view.testcase_view.curl_add_case import curl_input_case
from lapi_app.view.testcase_view.edit_tree import add_edit_tree, change_pid
from lapi_app.view.testcase_view.parametric_view import upload_parametric, del_parametric, get_parametric, \
    edit_parametric
from lapi_app.view.testcase_view.send_request import Send_request
from lapi_app.view.testcase_view.get_case import Singlecase
from lapi_app.view.testcase_view.edit_case import Testcase_action
from lapi_app.view.testcase_view.testcase_list import Testcase_list
from lapi_app.view.testcase_view.get_tree import api_menu_tree, delete_menu
from lapi_app.view.testcase_view.upload_case import Upload_case

urlpatterns = [
    path("api/testcase/api_testcase_tree", api_menu_tree),  # 用例目录

    path("api/testcase/testcase_tree/delete", delete_menu),  # 删除目录

    path("api/testcase/list", Testcase_list.as_view()),  # 用例列表

    path("api/testcase/all_list", Testcase_list.as_view()),  # 用例列表

    path("api/testcase/list/del_up", Testcase_action.as_view()),  # 用例详情

    path("api/testcase/send_request", Send_request.as_view()),  # 发送接口请求

    path("api/testcase/list/singlecase", Singlecase.as_view()),  # 获取单个接口

    path("api/testcase/editree", add_edit_tree),  # 新增/编辑/重命名

    path("api/testcase/upload", Upload_case.as_view()),  # 导入postman文件

    path("api/testcase/copy_case", Copy_case.as_view()),  # 复制测试用例

    path("api/testcase/parametric/upload", upload_parametric),  # 上传参数化文件

    path("api/testcase/parametric/delete_parametric", del_parametric),  # 删除参数化文件

    path("api/testcase/parametric/get_parametric", get_parametric),  # 获取参数化信息

    path("api/testcase/parametric/batch_send_request", batch_send),  # 批量请求接口

    path("api/testcase/parametric/get_batch_result", get_batch_result),  # 获取批量请求结果

    path("api/testcase/parametric/edit_parametric", edit_parametric),  # 编辑参数化文件

    path("api/testcase/parametric/get_single_batch_result", get_single_batch_result),  # 获取批量请求单个结果

    path("api/testcase/curl_input", curl_input_case),  # curl导入接口

    path("api/testcase/batch_list_request", batch_list_request),  # 多接口批量请求接口

    path("api/testcase/batch_get_case", get_case),  # 多接口批量请求接口添加单个接口

    path("api/testcase/change_pid", change_pid),  # 改变层级

    path("api/testcase/api_result", api_result),  # 获取接口的请求历史

]
